﻿using System.Security.Principal;
using System.Web;
using System.Web.Profile;

namespace Myotragus.Store.Models
{
  public class Profile
  {
    public static ProfileBase GetProfile(IIdentity identity)
    {
      return ProfileBase.Create(identity.Name, identity.IsAuthenticated);
    }

    public static ProfileBase Current
    {
      get
      {
        return GetProfile(HttpContext.Current.User.Identity);
      }
    }
  }
}
